﻿<Page
    x:Class="ExampleBrowser.MainPage"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:oxy="using:OxyPlot.Metro"  
    mc:Ignorable="d">
    
    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>

        <TextBlock Grid.ColumnSpan="2" Text="OxyPlot Example Browser"  Style="{StaticResource PageHeaderTextStyle}" Margin="10,20,30,40"/>
        <TextBlock Grid.Column="1" HorizontalAlignment="Right" Text="{Binding Version}" Style="{StaticResource PageHeaderTextStyle}" FontSize="11"/>

        <ListBox Grid.Row="1" ItemsSource="{Binding ExamplesView}" 
                 SelectedItem="{Binding SelectedExample, Mode=TwoWay}" 
                 BorderThickness="0,0,0,1">
            <ListBox.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <TextBlock FontWeight="Bold" Text="{Binding Key}" Padding="2"/>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                </GroupStyle>
            </ListBox.GroupStyle>
        </ListBox>     
                       
        <oxy:Plot x:Name="Plot1" Grid.Row="1" Grid.Column="1" Model="{Binding SelectedExample.PlotModel}" Background="White"/>        
    </Grid>
</Page>
